home *** CD-ROM | disk | FTP | other *** search
- /* $VER: 1.0, ©1996 Dietmar Eilert. Compile current file using DICE-C */
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
-
- if (RC ~= 0) then
- exit
-
- OPTIONS FAILAT 6 /* ignore warnings */
-
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
-
- 'QUERY CAT'
- isGerman = (result = "deutsch")
-
- 'QUERY ANYTEXT'
-
- if (result = 'TRUE') then
-
- do
-
- 'QUERY DOC VAR OLDNAME' /* remember current file name */
- 'SAVE ALL NAME="T:TEST.C"' /* create temorary file */
-
- shell /* address shell */
-
- 'dcc T:TEST.C -// -LDINCLUDE: -oT:TEST'
-
- ok = (RC = 0)
-
- shell /* address host (GoldED) */
-
- 'NAME NEW ' || oldname /* restore old file name */
-
- if (ok) then do
-
- if (isGerman) then
- 'REQUEST BODY="DCC fertig. Programm starten ?" BUTTON="!STARTEN|_Abbruch"'
- else
- 'REQUEST BODY="DCC done. Run program ?" BUTTON="!RUN|_Cancel"'
-
- if (result = 1) then do
-
- shell
- 'T:TEST'
- shell
-
- end
- end
- end
-
- else do
-
- if (isGerman) then
- 'REQUEST PROBLEM="Kein Text vorhanden ?!"'
- else
- 'REQUEST PROBLEM="Text buffer is empty ?!"'
- end
-
- /* ---------------------------- END OF YOUR CODE ----------------------- */
-
- 'UNLOCK' /* VERY important: unlock GUI */
-
- exit
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
-
- 'UNLOCK'
-
- exit
-